
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="../css/bootstrap-theme.min.css">
		<script type="text/javascript" src="../js/jquery-3.1.1.js"></script>
		<script type="text/javascript" src="../js/bootstrap.min.js"></script>
		<script type="text/javascript" src="../js/jquery.jeditable.js" ></script>
		<script type="text/javascript">
$(function(){
	 $('.edit').editable('save.php', { 
		 width     :120,
		 height    :18,
		 //onblur    : "ignore",
         cancel    : '取消',
         submit    : '确定',
         indicator : '<img src="../css/loader.gif">',
         tooltip   : '单击可以编辑...',
		 callback  : function(value, settings) {
			 $("#modifiedtime").html("刚刚");
         }

  });
});
</script>
	</head>
<body>
<?php
	session_start();
	if(isset($_SESSION['username'])){
?>
	<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<ul class="nav nav-tabs" style="padding: 2%;">
<?php
	if($_SESSION['role']>='1'){
?>
				<li>
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">查看信息<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="../ck/ckbks.php">本科生</a>
						</li>
						<li>
							 <a href="../ck/ckyjs.php">研究生</a>
						</li>
						<li>
							 <a href="../ck/ckbss.php">博士生</a>
						</li>
					</ul>
				</li>
<?php
	}
?>
<?php
	if($_SESSION['role']>='2'){
?>
				<li>
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">预修改信息<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="../yxg/yxgbks.php">本科生</a>
						</li>
						<li>
							 <a href="../yxg/yxgyjs.php">研究生</a>
						</li>
						<li>
							 <a href="../yxg/yxgbss.php">博士生</a>
						</li>
					</ul>
				</li>
<?php
	}
?>
<?php
	if($_SESSION['role']>='3'){
?>
				<li>
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">预修改信息审核<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="../check/checkbks.php">本科生</a>
						</li>
						<li>
							 <a href="../check/checkyjs.php">研究生</a>
						</li>
						<li>
							 <a href="../check/checkbss.php">博士生</a>
						</li>
					</ul>
				</li>
<?}
if($_SESSION['role']>='4'){
?>
				<li>
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">直接修改信息<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="xgbks.php">本科生</a>
						</li>
						<li>
							 <a href="xgyjs.php">研究生</a>
						</li>
						<li>
							 <a href="xgbss.php">博士生</a>
						</li>
					</ul>
				</li>
<?php
	}
?>
				<li class="dropdown pull-right">
					 <a href="#" data-toggle="dropdown" class="dropdown-toggle">用户<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li>
							 <a href="#">更改密码</a>
						</li>
						<li class="divider">
						</li>
						<li>
							 <a href="../logout.php">注销</a>
						</li>
					</ul>
				</li>
			</ul>
			<ul class="breadcrumb">
				<li>
					 直接修改信息
				</li>
				<li class="active">
					研究生
				</li>
			</ul>
			<table class="table table-hover">
				<thead>
					<tr>
						<?
						include_once("../conn.php");
						$sql="select * from yjszd";
						$resultZd = mysql_query($sql);
						while($row = mysql_fetch_array($resultZd)){
							if($row['zd']!='yxmc'&&$row['zd']!='xslb'){
					?>
						<th><font color=black><?=$row['name']?></font></th>
						<?}}?>
					</tr>
				</thead>
	<tbody>
<?php 	
	include_once("../conn.php");
	$result = mysql_query("SELECT * FROM master");
	while($row = mysql_fetch_array($result))
		{?>
	<tr>
		<td><font color=black><?=$row['xh'] ?></font></td>
		<td style="width: 60px"><font color=black><?=$row['xm'] ?></font></td>
		<?
			$sql="select * from yjszd";
			$resultZd = mysql_query($sql);
			while($zd = mysql_fetch_array($resultZd)){
				if($zd['zd']!='yxmc'&&$zd['zd']!='xslb'&&$zd['zd']!='xm'&&$zd['zd']!='xh'){
		?>
		<td class="edit" id="<?=$zd['zd'].$row['xh']?>"><?=$row[$zd['zd']] ?></td>
		<?}}?>
	</tr>
	<?}?>		
		</tbody>
		</table>
		</div>
	</div>
</div>
<?php }else{?>
<script>
	alert("请登录");
	window.location.href = 'login.html';
</script>
<?}?>
</body>
</html>
